package com.design.state;

/**
 * @author leali
 * @title: OffState
 * @projectName design
 * @description: 关闭状态
 * @date 2021/12/31 22:06
 */
//关闭状态
class OffState extends SwitchState {
    public void on(Switch s) {
        System.out.println("打开！");
        s.setState(Switch.getState("on"));
    }

    public void off(Switch s) {
        System.out.println("已经关闭！");
    }
}
